{{left_sidebar_enabled,right_sidebar_enabled=False,False}}
{{import os}}
{{extend 'layout.html'}}

{{ if action =="set":}}
Setting OS Version
<br>
{{script="/apps/infra/stateless/prod/bin/switch.pl"}}
{{cmd=script+" switch_os "+stateless_name+" "+stateless_os}}
Executing script
<br>
{{=cmd}}
{{output=os.system(cmd)}}
<br>
Setting OS environment
<br>
{{cmd=script+" switch_env "+stateless_name+" "+stateless_env}}
Executing script
<br>
{{=cmd}}
<br>
{{output=os.system(cmd)}}
{{pass}}



{{ if action =="stop" or action == "start" or action == "restart" :}}
Updating OS running state
<br>
{{script="/apps/infra/stateless/prod/bin/switch.pl"}}
{{cmd=script+" "+action+" "+stateless_name+" "}}
Executing script
<br>
{{=cmd}}
{{output=os.system(cmd)}}
{{pass}}